#include<stdio.h>
#include<math.h>

void generate(int n)
{
	FILE *f;
	char uid[10],pwd[10];
	int i=0,j,r1,r2;	
	f=fopen("pwd.dat","w");
//	pwd={'d','i','g','v','i','j','a','y','\0'};
	while(i<100)
	{
		j=0;		
		while(j<9)
		{	
			r1=((random()+n)%54)+65;		
			r2=((random()+n)%54)+65;			
			uid[j]=r1;
			pwd[j]=r2;
			j++;
		}
		uid[j]='\0';
		pwd[j]='\0';		
		printf("%s %s\n",uid,pwd);		
		fprintf(f,"%s %s\n",uid,pwd);
		i++;	
	}
	fclose(f);
}
int main(void)
{
	int n=1572;	
	generate(n);
	return 0;
}
